import request from "../utils/request";

export default {
    login (data) {
        return request({
            url: '/users/login',
            method: 'post',
            data
        })
    },
    getPermissionList (data) {
        return request({
            url: '/users/getPermissionList',
            method: 'get',
            data
        })
    },
    getUsersList (data) {
        return request({
            url: '/users/list',
            method: 'get',
            data
        })
    },
    getRolesAllList (data) {
        return request({
            url: '/roles/allList',
            method: 'get',
            data
        })
    },
    getDeptList (data) {
        return request({
            url: '/dept/list',
            method: 'get',
            data
        })
    },
    postUsersOperate (data) {
        return request({
            url: '/users/operate',
            method: 'post',
            data
        })
    },
    postUsersDelete (data) {
        return request({
            url: '/users/delete',
            method: 'post',
            data
        })
    },
    getMenuList (data) {
        return request({
            url: '/menu/list',
            method: 'get',
            data
        })
    },
    postMenuOperate (data) {
        return request({
            url: '/menu/operate',
            method: 'post',
            data
        })
    },
    getRolesList (data) {
        return request({
            url: '/roles/list',
            method: 'get',
            data
        })
    },
    postRolesOperate (data) {
        return request({
            url: '/roles/operate',
            method: 'post',
            data
        })
    },
    getDeptList (data) {
        return request({
            url: '/dept/list',
            method: 'get',
            data
        })
    },
    postDeptOperate (data) {
        return request({
            url: '/dept/operate',
            method: 'post',
            data
        })
    },
    postRolesUpdatePermission (data) {
        return request({
            url: '/roles/update/permission',
            method: 'post',
            data
        })
    },
    getLeaveList (data) {
        return request({
            url: '/leave/list',
            method: 'get',
            data
        })
    },
    postLeaveOperate (data) {
        return request({
            url: '/leave/operate',
            method: 'post',
            data
        })
    },
    postLeaveApprove (data) {
        return request({
            url: '/leave/approve',
            method: 'post',
            data
        })
    },
}